typing.Optional and type union in python